using System;

namespace BoxBinary.AspectCache.Core.ErrorLogging
{
    public class ErrorSummary
    {
        private ErrorMetaData _errorMetaData;
        private DateTime _raisedDateTime = DateTime.Now;

        public ErrorSummary(Exception e, ErrorMetaData metaData)
        {
            Exception = e;
            _errorMetaData = metaData;
        }

        public ErrorMetaData ErrorMetaData
        {
            get
            {
                if (_errorMetaData == null)
                    _errorMetaData = new ErrorMetaData();
                return _errorMetaData;
            }
            set { _errorMetaData = value; }
        }

        public DateTime RaisedDateTime
        {
            get { return _raisedDateTime; }
            set { _raisedDateTime = value; }
        }

        public Exception Exception { get; set; }
    }
}